//    Copyright (C) 2013  <lugocreation@gmail.com>
//
//    This program is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    (at your option) any later version.
//
//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License
//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
package org.jpgolay.me.agency;

import java.io.Serializable;

public class Agency
        implements Serializable {

    public Agency() {
    }

    public Agency(Integer id, String raisonSociale, String civilite, String adresseUn, String adresseDeux, String cp, String ville,
            String pays, String telephoneUn, String telephoneDeux, String telephoneTrois, String faxUn, String faxDeux, String faxTrois,
            String email, String siteWeb, String naf, String siret, String updateLastUserId, String updateLastTime, String userId,
            String gln, byte photo1[], byte photo2[], String notes) {
        setId(id);
        setRaisonSociale(raisonSociale);
        setCivilite(civilite);
        setAdresseUn(adresseUn);
        setAdresseDeux(adresseDeux);
        setCp(cp);
        setVille(ville);
        setPays(pays);
        setTelephoneUn(telephoneUn);
        setTelephoneDeux(telephoneDeux);
        setTelephoneTrois(telephoneTrois);
        setFaxUn(faxUn);
        setFaxDeux(faxDeux);
        setFaxTrois(faxTrois);
        setEmail(email);
        setSiteWeb(siteWeb);
        setNaf(naf);
        setSiret(siret);
        setUpdateLastUserId(updateLastUserId);
        setUpdateLastTime(updateLastTime);
        setUserId(userId);
        setGln(gln);
        setPhoto1(photo1);
        setPhoto2(photo2);
        setNotes(notes);
    }

    public Agency(Agency agency) {
        setId(agency.getId());
        setRaisonSociale(agency.getRaisonSociale());
        setCivilite(agency.getCivilite());
        setAdresseUn(agency.getAdresseUn());
        setAdresseDeux(agency.getAdresseDeux());
        setCp(agency.getCp());
        setVille(agency.getVille());
        setPays(agency.getPays());
        setTelephoneUn(agency.getTelephoneUn());
        setTelephoneDeux(agency.getTelephoneDeux());
        setTelephoneTrois(agency.getTelephoneTrois());
        setFaxUn(agency.getFaxUn());
        setFaxDeux(agency.getFaxDeux());
        setFaxTrois(agency.getFaxTrois());
        setEmail(agency.getEmail());
        setSiteWeb(agency.getSiteWeb());
        setNaf(agency.getNaf());
        setSiret(agency.getSiret());
        setUpdateLastUserId(agency.getUpdateLastUserId());
        setUpdateLastTime(agency.getUpdateLastTime());
        setUserId(agency.getUserId());
        setGln(agency.getGln());
        setPhoto1(agency.getPhoto1());
        setPhoto2(agency.getPhoto2());
        setNotes(agency.getNotes());
    }

    public Integer getId() {
        return id;
    }

    public String getRaisonSociale() {
        return raisonSociale;
    }

    public String getCivilite() {
        return civilite;
    }

    public String getAdresseUn() {
        return adresseUn;
    }

    public String getAdresseDeux() {
        return adresseDeux;
    }

    public String getCp() {
        return cp;
    }

    public String getVille() {
        return ville;
    }

    public String getPays() {
        return pays;
    }

    public String getTelephoneUn() {
        return telephoneUn;
    }

    public String getTelephoneDeux() {
        return telephoneDeux;
    }

    public String getTelephoneTrois() {
        return telephoneTrois;
    }

    public String getFaxUn() {
        return faxUn;
    }

    public String getFaxDeux() {
        return faxDeux;
    }

    public String getFaxTrois() {
        return faxTrois;
    }

    public String getEmail() {
        return email;
    }

    public String getSiteWeb() {
        return siteWeb;
    }

    public String getSiret() {
        return siret;
    }

    public String getNaf() {
        return naf;
    }

    public String getUpdateLastTime() {
        return updateLastTime;
    }

    public String getUpdateLastUserId() {
        return updateLastUserId;
    }

    public String getUserId() {
        return userId;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public void setRaisonSociale(String raisonSociale) {
        this.raisonSociale = raisonSociale;
    }

    public void setCivilite(String civilite) {
        this.civilite = civilite;
    }

    public void setAdresseUn(String adresseUn) {
        this.adresseUn = adresseUn;
    }

    public void setAdresseDeux(String adresseDeux) {
        this.adresseDeux = adresseDeux;
    }

    public void setCp(String cp) {
        this.cp = cp;
    }

    public void setVille(String ville) {
        this.ville = ville;
    }

    public void setPays(String pays) {
        this.pays = pays;
    }

    public void setTelephoneUn(String telephoneUn) {
        this.telephoneUn = telephoneUn;
    }

    public void setTelephoneDeux(String telephoneDeux) {
        this.telephoneDeux = telephoneDeux;
    }

    public void setTelephoneTrois(String telephoneTrois) {
        this.telephoneTrois = telephoneTrois;
    }

    public void setFaxUn(String faxUn) {
        this.faxUn = faxUn;
    }

    public void setFaxDeux(String faxDeux) {
        this.faxDeux = faxDeux;
    }

    public void setFaxTrois(String faxTrois) {
        this.faxTrois = faxTrois;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public void setSiteWeb(String siteWeb) {
        this.siteWeb = siteWeb;
    }

    public void setSiret(String siret) {
        this.siret = siret;
    }

    public void setNaf(String naf) {
        this.naf = naf;
    }

    public void setUpdateLastTime(String updateLastTime) {
        this.updateLastTime = updateLastTime;
    }

    public void setUpdateLastUserId(String updateLastUserId) {
        this.updateLastUserId = updateLastUserId;
    }

    public String getGln() {
        return gln;
    }

    public void setGln(String gln) {
        this.gln = gln;
    }

    public byte[] getPhoto1() {
        return photo1;
    }

    public void setPhoto1(byte photo1[]) {
        this.photo1 = photo1;
    }

    public byte[] getPhoto2() {
        return photo2;
    }

    public void setPhoto2(byte photo2[]) {
        this.photo2 = photo2;
    }

    public String getNotes() {
        return notes;
    }

    public void setNotes(String notes) {
        this.notes = notes;
    }

    public String toString() {
        StringBuffer str = new StringBuffer("{");
        str.append("id=" + getId() + " " + "raisonSociale=" + getRaisonSociale() + " " + "civilite=" + getCivilite() + " " + "adresseUn=" + getAdresseUn() + " " + "adresseDeux=" + getAdresseDeux() + " " + "cp=" + getCp() + " " + "ville=" + getVille() + " " + "pays=" + getPays() + " " + "telephoneUn=" + getTelephoneUn() + " " + "telephoneDeux=" + getTelephoneDeux() + " " + "telephoneTrois=" + getTelephoneTrois() + " " + "faxUn=" + getFaxUn() + " " + "faxDeux=" + getFaxDeux() + " " + "faxTrois=" + getFaxTrois() + " " + "email=" + getEmail() + " " + "siteWeb=" + getSiteWeb() + " " + "naf=" + getNaf() + " " + "siret=" + getSiret() + " " + "updateLastUserId=" + getUpdateLastUserId() + " " + "updateLastTime=" + getUpdateLastTime() + " " + "notes=" + getNotes() + " " + "gln=" + getGln() + " " + "userId=" + getUserId());
        str.append('}');
        return str.toString();
    }

    public boolean equals(Object pOther) {
        if (pOther instanceof Agency) {
            Agency lTest = (Agency) pOther;
            boolean lEquals = true;
            if (id == null) {
                lEquals = lEquals && lTest.id == null;
            } else {
                lEquals = lEquals && id.equals(lTest.id);
            }
            if (raisonSociale == null) {
                lEquals = lEquals && lTest.raisonSociale == null;
            } else {
                lEquals = lEquals && raisonSociale.equals(lTest.raisonSociale);
            }
            if (civilite == null) {
                lEquals = lEquals && lTest.civilite == null;
            } else {
                lEquals = lEquals && civilite.equals(lTest.civilite);
            }
            if (adresseUn == null) {
                lEquals = lEquals && lTest.adresseUn == null;
            } else {
                lEquals = lEquals && adresseUn.equals(lTest.adresseUn);
            }
            if (adresseDeux == null) {
                lEquals = lEquals && lTest.adresseDeux == null;
            } else {
                lEquals = lEquals && adresseDeux.equals(lTest.adresseDeux);
            }
            if (cp == null) {
                lEquals = lEquals && lTest.cp == null;
            } else {
                lEquals = lEquals && cp.equals(lTest.cp);
            }
            if (ville == null) {
                lEquals = lEquals && lTest.ville == null;
            } else {
                lEquals = lEquals && ville.equals(lTest.ville);
            }
            if (pays == null) {
                lEquals = lEquals && lTest.pays == null;
            } else {
                lEquals = lEquals && pays.equals(lTest.pays);
            }
            if (telephoneUn == null) {
                lEquals = lEquals && lTest.telephoneUn == null;
            } else {
                lEquals = lEquals && telephoneUn.equals(lTest.telephoneUn);
            }
            if (telephoneDeux == null) {
                lEquals = lEquals && lTest.telephoneDeux == null;
            } else {
                lEquals = lEquals && telephoneDeux.equals(lTest.telephoneDeux);
            }
            if (telephoneTrois == null) {
                lEquals = lEquals && lTest.telephoneTrois == null;
            } else {
                lEquals = lEquals && telephoneTrois.equals(lTest.telephoneTrois);
            }
            if (faxUn == null) {
                lEquals = lEquals && lTest.faxUn == null;
            } else {
                lEquals = lEquals && faxUn.equals(lTest.faxUn);
            }
            if (faxDeux == null) {
                lEquals = lEquals && lTest.faxDeux == null;
            } else {
                lEquals = lEquals && faxDeux.equals(lTest.faxDeux);
            }
            if (faxTrois == null) {
                lEquals = lEquals && lTest.faxTrois == null;
            } else {
                lEquals = lEquals && faxTrois.equals(lTest.faxTrois);
            }
            if (email == null) {
                lEquals = lEquals && lTest.email == null;
            } else {
                lEquals = lEquals && email.equals(lTest.email);
            }
            if (siteWeb == null) {
                lEquals = lEquals && lTest.siteWeb == null;
            } else {
                lEquals = lEquals && siteWeb.equals(lTest.siteWeb);
            }
            if (naf == null) {
                lEquals = lEquals && lTest.naf == null;
            } else {
                lEquals = lEquals && naf.equals(lTest.naf);
            }
            if (siret == null) {
                lEquals = lEquals && lTest.siret == null;
            } else {
                lEquals = lEquals && siret.equals(lTest.siret);
            }
            if (updateLastUserId == null) {
                lEquals = lEquals && lTest.updateLastUserId == null;
            } else {
                lEquals = lEquals && updateLastUserId.equals(lTest.updateLastUserId);
            }
            if (updateLastTime == null) {
                lEquals = lEquals && lTest.updateLastTime == null;
            } else {
                lEquals = lEquals && updateLastTime.equals(lTest.updateLastTime);
            }
            if (userId == null) {
                lEquals = lEquals && lTest.userId == null;
            } else {
                lEquals = lEquals && userId.equals(lTest.userId);
            }
            if (gln == null) {
                lEquals = lEquals && lTest.gln == null;
            } else {
                lEquals = lEquals && gln.equals(lTest.gln);
            }
            if (photo1 == null) {
                lEquals = lEquals && lTest.photo1 == null;
            } else {
                lEquals = lEquals && photo1.equals(lTest.photo1);
            }
            if (photo2 == null) {
                lEquals = lEquals && lTest.photo2 == null;
            } else {
                lEquals = lEquals && photo2.equals(lTest.photo2);
            }
            if (notes == null) {
                lEquals = lEquals && lTest.notes == null;
            } else {
                lEquals = lEquals && notes.equals(lTest.notes);
            }
            return lEquals;
        } else {
            return false;
        }
    }

    public int hashCode() {
        int result = 17;
        result = 37 * result + (id == null ? 0 : id.hashCode());
        result = 37 * result + (raisonSociale == null ? 0 : raisonSociale.hashCode());
        result = 37 * result + (civilite == null ? 0 : civilite.hashCode());
        result = 37 * result + (adresseUn == null ? 0 : adresseUn.hashCode());
        result = 37 * result + (adresseDeux == null ? 0 : adresseDeux.hashCode());
        result = 37 * result + (cp == null ? 0 : cp.hashCode());
        result = 37 * result + (ville == null ? 0 : ville.hashCode());
        result = 37 * result + (pays == null ? 0 : pays.hashCode());
        result = 37 * result + (telephoneUn == null ? 0 : telephoneUn.hashCode());
        result = 37 * result + (telephoneDeux == null ? 0 : telephoneDeux.hashCode());
        result = 37 * result + (telephoneTrois == null ? 0 : telephoneTrois.hashCode());
        result = 37 * result + (faxUn == null ? 0 : faxUn.hashCode());
        result = 37 * result + (faxDeux == null ? 0 : faxDeux.hashCode());
        result = 37 * result + (faxTrois == null ? 0 : faxTrois.hashCode());
        result = 37 * result + (email == null ? 0 : email.hashCode());
        result = 37 * result + (siteWeb == null ? 0 : siteWeb.hashCode());
        result = 37 * result + (naf == null ? 0 : naf.hashCode());
        result = 37 * result + (siret == null ? 0 : siret.hashCode());
        result = 37 * result + (updateLastUserId == null ? 0 : updateLastUserId.hashCode());
        result = 37 * result + (updateLastTime == null ? 0 : updateLastTime.hashCode());
        result = 37 * result + (userId == null ? 0 : userId.hashCode());
        result = 37 * result + (gln == null ? 0 : gln.hashCode());
        result = 37 * result + (photo1 == null ? 0 : photo1.hashCode());
        result = 37 * result + (photo2 == null ? 0 : photo2.hashCode());
        result = 37 * result + (notes == null ? 0 : notes.hashCode());
        return result;
    }
    private Integer id;
    private String raisonSociale;
    private String civilite;
    private String adresseUn;
    private String adresseDeux;
    private String cp;
    private String ville;
    private String pays;
    private String telephoneUn;
    private String telephoneDeux;
    private String telephoneTrois;
    private String faxUn;
    private String faxDeux;
    private String faxTrois;
    private String email;
    private String siteWeb;
    private String naf;
    private String siret;
    private String updateLastUserId;
    private String updateLastTime;
    private String userId;
    private String gln;
    private byte photo1[];
    private byte photo2[];
    private String notes;
}
